<?php

declare (strict_types=1);

namespace app\common\enum\exchange;

use app\common\enum\EnumBasics;

/**
 * 枚举类：兑换码有效期
 * Class ApplyRange
 * @package app\common\enum\coupon
 */
class ValidityType extends EnumBasics
{
    // 永久有效
    const ALL = 10;

    // 固定时间
    const SOME = 20;

    // 相对时间
    const EXCLUDE = 30;

    /**
     * 获取枚举类型值
     * @return array
     */
    public static function data(): array
    {
        return [
            self::ALL => [
                'name' => '永久有效',
                'value' => self::ALL
            ],
            self::SOME => [
                'name' => '固定时间',
                'value' => self::SOME
            ],
            self::EXCLUDE => [
                'name' => '相对时间',
                'value' => self::EXCLUDE
            ]
        ];
    }
}
